package io;

import java.io.BufferedOutputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 * 字节缓冲输出流测试
 */
public class BufferedOutputStreamTest {
    public static void main(String[] args) {
        write();
    }

    private static void write() {
        try (
                BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("/Users/luchuan/IdeaProjects/java-test/a.txt"));
        ) {
            bos.write("你好".getBytes());
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }


    }
}
